import request from '@/utils/request'

export default {
    getTreeMenu: () => {
        return request({
            url: '/menu/getTreeMenu',
            method: 'get'
        })
    },
    getRouteList: (params) => {
        return request({
            url: '/menu/getRouteList',
            method: 'get',
            params: {
                userType: params
            }
        })
    },
    add: (params) => {
        return request({
            url: '/menu/add',
            method: 'post',
            data: params
        })
    },
    update: (params) => {
        return request({
            url: '/menu/update',
            method: 'put',
            data: params
        })
    },
    remove: (id) => {
        return request({
            url: '/menu/delete/' + id,
            method: 'delete',
        })
    }
}
